package com.satchi.hib.pojo;

import java.text.DecimalFormat;
import java.util.*;

import com.satchi.struts.ActionHelper;

/**
 * FinReceipt entity. @author MyEclipse Persistence Tools
 */

public class FinReceipt implements java.io.Serializable {

	private String receiptId;
	private FinUser finUser;
	private Date receiptDate;
	private Date writeDate;
	private String gatherWay;
	private Double receiptPrince;
	private String receiptRemark;
	private FinCustomer finCustomer;
	private boolean isClosed;
	private Date closeDate;

	public Date getCloseDate() {
		return closeDate;
	}

	public void setCloseDate(Date closeDate) {
		this.closeDate = closeDate;
	}

	public String getReceiptId() {
		return this.receiptId;
	}

	public void setReceiptId(String receiptId) {
		this.receiptId = receiptId;
	}

	public FinUser getFinUser() {
		return this.finUser;
	}

	public void setFinUser(FinUser finUser) {
		this.finUser = finUser;
	}

	public Date getReceiptDate() {
		return this.receiptDate;
	}

	public void setReceiptDate(Date receiptDate) {
		this.receiptDate = receiptDate;
	}

	public Date getWriteDate() {
		return this.writeDate;
	}

	public void setWriteDate(Date writeDate) {
		this.writeDate = writeDate;
	}

	public String getGatherWay() {
		return this.gatherWay;
	}

	public void setGatherWay(String gatherWay) {
		this.gatherWay = gatherWay;
	}
	
	public String getReceiptPrince2() {
		DecimalFormat format = new DecimalFormat("###0.00"); 
	    return format.format(receiptPrince);
	}
	
	public Double getReceiptPrince() {
		return this.receiptPrince;
	}

	public void setReceiptPrince(Double receiptPrince) {
		this.receiptPrince = receiptPrince;
	}

	public String getReceiptRemark() {
		return this.receiptRemark;
	}

	public void setReceiptRemark(String receiptRemark) {
		this.receiptRemark = receiptRemark;
	}

	public FinCustomer getFinCustomer() {
		return finCustomer;
	}

	public void setFinCustomer(FinCustomer finCustomer) {
		this.finCustomer = finCustomer;
	}

	public boolean getIsClosed() {
		return isClosed;
	}

	public void setIsClosed(boolean isClosed) {
		this.isClosed = isClosed;
	}

	public String getShortRemark() {
		if (receiptRemark.length() > 10) {
			return receiptRemark.substring(0, 10) + "...";
		}
		return receiptRemark;
	}
}